package com.jiulong.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class TQuestionnaireExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public TQuestionnaireExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andTitleIsNull() {
            addCriterion("title is null");
            return (Criteria) this;
        }

        public Criteria andTitleIsNotNull() {
            addCriterion("title is not null");
            return (Criteria) this;
        }

        public Criteria andTitleEqualTo(String value) {
            addCriterion("title =", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotEqualTo(String value) {
            addCriterion("title <>", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThan(String value) {
            addCriterion("title >", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleGreaterThanOrEqualTo(String value) {
            addCriterion("title >=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThan(String value) {
            addCriterion("title <", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLessThanOrEqualTo(String value) {
            addCriterion("title <=", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleLike(String value) {
            addCriterion("title like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotLike(String value) {
            addCriterion("title not like", value, "title");
            return (Criteria) this;
        }

        public Criteria andTitleIn(List<String> values) {
            addCriterion("title in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotIn(List<String> values) {
            addCriterion("title not in", values, "title");
            return (Criteria) this;
        }

        public Criteria andTitleBetween(String value1, String value2) {
            addCriterion("title between", value1, value2, "title");
            return (Criteria) this;
        }

        public Criteria andTitleNotBetween(String value1, String value2) {
            addCriterion("title not between", value1, value2, "title");
            return (Criteria) this;
        }

        public Criteria andTitle2IsNull() {
            addCriterion("title2 is null");
            return (Criteria) this;
        }

        public Criteria andTitle2IsNotNull() {
            addCriterion("title2 is not null");
            return (Criteria) this;
        }

        public Criteria andTitle2EqualTo(String value) {
            addCriterion("title2 =", value, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2NotEqualTo(String value) {
            addCriterion("title2 <>", value, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2GreaterThan(String value) {
            addCriterion("title2 >", value, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2GreaterThanOrEqualTo(String value) {
            addCriterion("title2 >=", value, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2LessThan(String value) {
            addCriterion("title2 <", value, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2LessThanOrEqualTo(String value) {
            addCriterion("title2 <=", value, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2Like(String value) {
            addCriterion("title2 like", value, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2NotLike(String value) {
            addCriterion("title2 not like", value, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2In(List<String> values) {
            addCriterion("title2 in", values, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2NotIn(List<String> values) {
            addCriterion("title2 not in", values, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2Between(String value1, String value2) {
            addCriterion("title2 between", value1, value2, "title2");
            return (Criteria) this;
        }

        public Criteria andTitle2NotBetween(String value1, String value2) {
            addCriterion("title2 not between", value1, value2, "title2");
            return (Criteria) this;
        }

        public Criteria andCreatedateIsNull() {
            addCriterion("createdate is null");
            return (Criteria) this;
        }

        public Criteria andCreatedateIsNotNull() {
            addCriterion("createdate is not null");
            return (Criteria) this;
        }

        public Criteria andCreatedateEqualTo(Date value) {
            addCriterion("createdate =", value, "createdate");
            return (Criteria) this;
        }

        public Criteria andCreatedateNotEqualTo(Date value) {
            addCriterion("createdate <>", value, "createdate");
            return (Criteria) this;
        }

        public Criteria andCreatedateGreaterThan(Date value) {
            addCriterion("createdate >", value, "createdate");
            return (Criteria) this;
        }

        public Criteria andCreatedateGreaterThanOrEqualTo(Date value) {
            addCriterion("createdate >=", value, "createdate");
            return (Criteria) this;
        }

        public Criteria andCreatedateLessThan(Date value) {
            addCriterion("createdate <", value, "createdate");
            return (Criteria) this;
        }

        public Criteria andCreatedateLessThanOrEqualTo(Date value) {
            addCriterion("createdate <=", value, "createdate");
            return (Criteria) this;
        }

        public Criteria andCreatedateIn(List<Date> values) {
            addCriterion("createdate in", values, "createdate");
            return (Criteria) this;
        }

        public Criteria andCreatedateNotIn(List<Date> values) {
            addCriterion("createdate not in", values, "createdate");
            return (Criteria) this;
        }

        public Criteria andCreatedateBetween(Date value1, Date value2) {
            addCriterion("createdate between", value1, value2, "createdate");
            return (Criteria) this;
        }

        public Criteria andCreatedateNotBetween(Date value1, Date value2) {
            addCriterion("createdate not between", value1, value2, "createdate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateIsNull() {
            addCriterion("updatedate is null");
            return (Criteria) this;
        }

        public Criteria andUpdatedateIsNotNull() {
            addCriterion("updatedate is not null");
            return (Criteria) this;
        }

        public Criteria andUpdatedateEqualTo(Date value) {
            addCriterion("updatedate =", value, "updatedate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateNotEqualTo(Date value) {
            addCriterion("updatedate <>", value, "updatedate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateGreaterThan(Date value) {
            addCriterion("updatedate >", value, "updatedate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateGreaterThanOrEqualTo(Date value) {
            addCriterion("updatedate >=", value, "updatedate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateLessThan(Date value) {
            addCriterion("updatedate <", value, "updatedate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateLessThanOrEqualTo(Date value) {
            addCriterion("updatedate <=", value, "updatedate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateIn(List<Date> values) {
            addCriterion("updatedate in", values, "updatedate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateNotIn(List<Date> values) {
            addCriterion("updatedate not in", values, "updatedate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateBetween(Date value1, Date value2) {
            addCriterion("updatedate between", value1, value2, "updatedate");
            return (Criteria) this;
        }

        public Criteria andUpdatedateNotBetween(Date value1, Date value2) {
            addCriterion("updatedate not between", value1, value2, "updatedate");
            return (Criteria) this;
        }

        public Criteria andCreateaccountIsNull() {
            addCriterion("createAccount is null");
            return (Criteria) this;
        }

        public Criteria andCreateaccountIsNotNull() {
            addCriterion("createAccount is not null");
            return (Criteria) this;
        }

        public Criteria andCreateaccountEqualTo(String value) {
            addCriterion("createAccount =", value, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountNotEqualTo(String value) {
            addCriterion("createAccount <>", value, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountGreaterThan(String value) {
            addCriterion("createAccount >", value, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountGreaterThanOrEqualTo(String value) {
            addCriterion("createAccount >=", value, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountLessThan(String value) {
            addCriterion("createAccount <", value, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountLessThanOrEqualTo(String value) {
            addCriterion("createAccount <=", value, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountLike(String value) {
            addCriterion("createAccount like", value, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountNotLike(String value) {
            addCriterion("createAccount not like", value, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountIn(List<String> values) {
            addCriterion("createAccount in", values, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountNotIn(List<String> values) {
            addCriterion("createAccount not in", values, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountBetween(String value1, String value2) {
            addCriterion("createAccount between", value1, value2, "createaccount");
            return (Criteria) this;
        }

        public Criteria andCreateaccountNotBetween(String value1, String value2) {
            addCriterion("createAccount not between", value1, value2, "createaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountIsNull() {
            addCriterion("updateAccount is null");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountIsNotNull() {
            addCriterion("updateAccount is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountEqualTo(String value) {
            addCriterion("updateAccount =", value, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountNotEqualTo(String value) {
            addCriterion("updateAccount <>", value, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountGreaterThan(String value) {
            addCriterion("updateAccount >", value, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountGreaterThanOrEqualTo(String value) {
            addCriterion("updateAccount >=", value, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountLessThan(String value) {
            addCriterion("updateAccount <", value, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountLessThanOrEqualTo(String value) {
            addCriterion("updateAccount <=", value, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountLike(String value) {
            addCriterion("updateAccount like", value, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountNotLike(String value) {
            addCriterion("updateAccount not like", value, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountIn(List<String> values) {
            addCriterion("updateAccount in", values, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountNotIn(List<String> values) {
            addCriterion("updateAccount not in", values, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountBetween(String value1, String value2) {
            addCriterion("updateAccount between", value1, value2, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andUpdateaccountNotBetween(String value1, String value2) {
            addCriterion("updateAccount not between", value1, value2, "updateaccount");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(String value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(String value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(String value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(String value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(String value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(String value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLike(String value) {
            addCriterion("status like", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotLike(String value) {
            addCriterion("status not like", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<String> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<String> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(String value1, String value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(String value1, String value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andShowstartdateIsNull() {
            addCriterion("showStartDate is null");
            return (Criteria) this;
        }

        public Criteria andShowstartdateIsNotNull() {
            addCriterion("showStartDate is not null");
            return (Criteria) this;
        }

        public Criteria andShowstartdateEqualTo(Date value) {
            addCriterionForJDBCDate("showStartDate =", value, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowstartdateNotEqualTo(Date value) {
            addCriterionForJDBCDate("showStartDate <>", value, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowstartdateGreaterThan(Date value) {
            addCriterionForJDBCDate("showStartDate >", value, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowstartdateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("showStartDate >=", value, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowstartdateLessThan(Date value) {
            addCriterionForJDBCDate("showStartDate <", value, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowstartdateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("showStartDate <=", value, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowstartdateIn(List<Date> values) {
            addCriterionForJDBCDate("showStartDate in", values, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowstartdateNotIn(List<Date> values) {
            addCriterionForJDBCDate("showStartDate not in", values, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowstartdateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("showStartDate between", value1, value2, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowstartdateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("showStartDate not between", value1, value2, "showstartdate");
            return (Criteria) this;
        }

        public Criteria andShowenddateIsNull() {
            addCriterion("showEndDate is null");
            return (Criteria) this;
        }

        public Criteria andShowenddateIsNotNull() {
            addCriterion("showEndDate is not null");
            return (Criteria) this;
        }

        public Criteria andShowenddateEqualTo(Date value) {
            addCriterionForJDBCDate("showEndDate =", value, "showenddate");
            return (Criteria) this;
        }

        public Criteria andShowenddateNotEqualTo(Date value) {
            addCriterionForJDBCDate("showEndDate <>", value, "showenddate");
            return (Criteria) this;
        }

        public Criteria andShowenddateGreaterThan(Date value) {
            addCriterionForJDBCDate("showEndDate >", value, "showenddate");
            return (Criteria) this;
        }

        public Criteria andShowenddateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("showEndDate >=", value, "showenddate");
            return (Criteria) this;
        }

        public Criteria andShowenddateLessThan(Date value) {
            addCriterionForJDBCDate("showEndDate <", value, "showenddate");
            return (Criteria) this;
        }

        public Criteria andShowenddateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("showEndDate <=", value, "showenddate");
            return (Criteria) this;
        }

        public Criteria andShowenddateIn(List<Date> values) {
            addCriterionForJDBCDate("showEndDate in", values, "showenddate");
            return (Criteria) this;
        }

        public Criteria andShowenddateNotIn(List<Date> values) {
            addCriterionForJDBCDate("showEndDate not in", values, "showenddate");
            return (Criteria) this;
        }

        public Criteria andShowenddateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("showEndDate between", value1, value2, "showenddate");
            return (Criteria) this;
        }

        public Criteria andShowenddateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("showEndDate not between", value1, value2, "showenddate");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}